home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / AmigaUUCP / dnews / afilereq.old < prev    next >
Text File  |  1990-05-21  |  976b  |  48 lines

  1.  
  2.         ;   arpreq(hail,file,dir,window)
  3.  
  4.         section data,data
  5.  
  6.         xdef    _arpreq
  7.         xref    _LVOOldOpenLibrary
  8.         xref    _LVOCloseLibrary
  9.  
  10. _LVOFileRequest equ    -294
  11.  
  12. arp_name_text    dc.b 'arp.library',0
  13.  
  14. fs        ds.l    1   ;hailing text
  15.         ds.l    1   ;file name
  16.         ds.l    1   ;directory
  17.         ds.l    1   ;window requesting
  18.         ds.w    1   ;LONG Align, idiots!  set to 0
  19.         ds.l    1   ;func for wildcards
  20.         ds.l    1   ;func to call w/intuimessages
  21.  
  22.         section text,code
  23.  
  24. _arpreq:    movem.l D2-D3/A6,-(sp)
  25.         lea.l    fs(A4),A0
  26.         movem.l 4+12(sp),D0-D3           ;setup fields
  27.         movem.l D0-D3,(A0)
  28.         clr.w    fs+16(A4)
  29.         move.l    4,A6
  30.  
  31.         lea.l    arp_name_text(A4),a1        ;open library
  32.         jsr    _LVOOldOpenLibrary(a6)
  33.         tst.l    d0
  34.         beq    .done
  35.         move.l    d0,a6
  36.         lea.l    fs(A4),a0
  37.         jsr    _LVOFileRequest(A6)     ;call requestor
  38.         move.l    D0,-(sp)                ;return value
  39.         move.l    A6,A1            ;CloseLibrary(arpbase)
  40.         move.l    4,A6
  41.         jsr    _LVOCloseLibrary(A6)
  42.         move.l    (sp)+,D0                ;return value
  43. .done        movem.l (sp)+,D2-D3/A6
  44.         rts
  45.  
  46.         END
  47.  
  48.